package com.bookshop.entity;

import java.io.Serializable;
import java.util.Date;


/**
 * 图书实体
 * @author aiden
 *
 */
public class Book implements Serializable {
	
	private static final long serialVersionUID = -6141745002621911535L;
	
	private Integer id; //编号
	private String title;//书名
	private String author;//作者
	private String isbn;//图书唯一码（也是路径的一部分）
	private Double unitPrice;//价格
	private String contentDescription;//内容
	private String toc;//章节	
	private int clicks;//点击量
	private int isSale;//是否上架 0:不上架 1:上架 
	private int warnStock;//预警库存
	private int sumStock;//总库存

	private Date publishDate;//出版日期

	private Date saleTime;//上架时间	
	private Publisher publisher; //出版社
	private Category category; //图书类型
	

	public Book(Integer id,String title, String author, String isbn,
			Double unitPrice, String contentDescription, String toc,
			 int isSale, int warnStock, int sumStock,
			Date publishDate, Publisher publisher,
			Category category) {
		this.id=id;
		this.title = title;
		this.author = author;
		this.isbn = isbn;
		this.unitPrice = unitPrice;
		this.contentDescription = contentDescription;
		this.toc = toc;
		this.clicks = 0;
		this.isSale = isSale;
		this.warnStock = warnStock;
		this.sumStock = sumStock;
		this.publishDate = publishDate;
		this.publisher = publisher;
		this.category = category;
	}
	
	public Book(String title, String author, String isbn,
			Double unitPrice, String contentDescription, String toc,
			 int isSale, int warnStock, int sumStock,
			Date publishDate, Publisher publisher,
			Category category) {
		
		this.title = title;
		this.author = author;
		this.isbn = isbn;
		this.unitPrice = unitPrice;
		this.contentDescription = contentDescription;
		this.toc = toc;
		this.clicks = 0;
		this.isSale = isSale;
		this.warnStock = warnStock;
		this.sumStock = sumStock;
		this.publishDate = publishDate;
		this.publisher = publisher;
		this.category = category;
	}
	
 
	public Book() {
		super();
	}
 
	public int getWarnStock() {
		return warnStock;
	}
	public void setWarnStock(int warnStock) {
		this.warnStock = warnStock;
	}
	public int getSumStock() {
		return sumStock;
	}
	public void setSumStock(int sumStock) {
		this.sumStock = sumStock;
	}
	public Date getSaleTime() {
		return saleTime;
	}
	public void setSaleTime(Date saleTime) {
		this.saleTime = saleTime;
	}
	public int getIsSale() {
		return isSale;
	}
	public void setIsSale(int isSale) {
		this.isSale = isSale;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Publisher getPublisher() {
		return publisher;
	}
	public void setPublisher(Publisher publisher) {
		this.publisher = publisher;
	}
	public Category getCategory() {
		return category;
	}
	public void setCategory(Category category) {
		this.category = category;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public Date getPublishDate() {
		return publishDate;
	}
	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}
	 
	public Double getUnitPrice() {
		return unitPrice;
	}
	public void setUnitPrice(Double unitPrice) {
		this.unitPrice = unitPrice;
	}
	public String getContentDescription() {
		return contentDescription;
	}
	public void setContentDescription(String contentDescription) {
		this.contentDescription = contentDescription;
	}
	 
	public int getClicks() {
		return clicks;
	}
	public void setClicks(int clicks) {
		this.clicks = clicks;
	}
	public String getIsbn() {
		return isbn;
	}
	public String getToc() {
		return toc;
	}
	public void setIsbn(String isbn) {
		this.isbn = isbn;
	}
	public void setToc(String toc) {
		this.toc = toc;
	}
	
 
	
}
